package com.lovo.testjpa.dao;

import com.lovo.testjpa.bean.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface RoleDAO extends JpaRepository<Role,Integer> {
    @Modifying
    @Query(value = "delete from t_user_role where ur_r_id=:id",nativeQuery = true)
    void deleteUserRoleByRoleId(Integer id);
}
